﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GreatestSubsequentialSum
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = new int[] { -2, 1, -3, 4, -1, 2, 1, -5, 4 };

            input.LargestSumContiguousSubarray();

            Console.ReadLine();

            Console.WriteLine(input.LargestSumContiguousSubarrayOptimized());

            Console.ReadLine();

        }
    }
}
